#ifndef _PARAM_H_
#define _PARAM_H_

#include <stdint.h>
#include "flash.h"

#define  HOST_ID  0x01
/*
BOOT_FLAG
0xAA 升级完成，正常启动APP
0xBB 升级中，启动BOOT
*/
#define  BOOT2APP_FLAG  0xAA
#define  BOOT2IAP_FLAG  0xBB
#define PARAM_ADDR 0x0800b800

typedef struct param_s
{
    uint8_t version_major;
    uint8_t version_minor;
    uint8_t host_id;
    uint8_t boot_flag;
}param_t;

void param_init(param_t *param_ptr);
void param_read(param_t *param_ptr);

#endif /* _PARAM_H_ */
